﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CoreDemo.Extensions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace CoreDemo.Controllers
{
   
    public class ValuesController : Controller
    {
        public IActionResult GetIp()
        {
            return Json(new
            {
                ClientIp = HttpContext.GetRemoteIp(),
                Now = DateTime.Now
            });
        }
    }
}